package fr.mairie.parc.dao.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.ResultSetExtractor;

import fr.mairie.parc.domain.Attribution;

public class AttributionResultSetExtractor implements ResultSetExtractor{

	@Override
	public Object extractData(ResultSet rs) throws SQLException,
			DataAccessException {
			Attribution attribution= new Attribution();
			attribution.setIdAttribution(rs.getInt(1));
			attribution.setIdDemande(rs.getInt(2));
			attribution.setIdUser(rs.getInt(3));
			attribution.setIdMateriel(rs.getInt(4));
		
		return attribution;
	}

}
